(function(angular) {
	'use strict';
	angular.module('fs.waf').controller('cda.companyInfo.viewController', viewController);
	viewController.$inject = [ '$scope', 'Constants', '$q', 'layoutConfig', 'validatorConfig', 'gridService', 'authService', 'companyInfoService' ,'storageService','companyService', 'ajaxServiceFactory'];
	function viewController($scope, Constants, $q, layoutConfig, validatorConfig, gridService, authService, companyInfoService ,storageService,companyService, ajaxServiceFactory) {
		var ctrl = this, company = $scope.$stateParams.params;
		companyInfoService.getWorkingCompanyCode().then(function(response) {
			var workingCompanyCode = response.data.companyCode;
			var companyType = storageService.getUserInfo().companyType ;
			if("BANK" == companyType){
				$scope.go('cda.site.view',{siteCode : workingCompanyCode,isReqiredBack : false});
			}else{
				$scope.go('cda.company.view',{companyCode : workingCompanyCode,isReqiredBack : false});
			}
		});
	}
})(angular);














